package cc.git.liuyan.customeraiagent.core.provider.giteeai.bigmodel.api.reqandres;

import lombok.Data;

import java.util.List;

@Data
public class GiteeAiBigModelApiResponse {
    private String id;
    private Usage usage;
    private List<ChoicesItem> choices;

    @Data
    public static class ChoicesItem {
        private Integer index;
        private Message message;
        private Delta delta;
        //=stop/length
        private String finish_reason;

        //非流式接口使用该字段
        @Data
        public static class Message {
            private String role;
            private String reasoning_content;
            private String content;
        }

        //流式接口使用该字段
        @Data
        public static class Delta {
            //role=assistant content="" 是思考过程的开始
            //思考过程只有reasoning_content字段
            //回答过程只有content字段 \n\n 作为开始标识
            private String role;
            private String reasoning_content;
            private String content;
        }
    }

    @Data
    public static class Usage {
        private Integer prompt_tokens;
        private Integer total_tokens;
        private Integer completion_tokens;
    }
}
